<template>
	<view>
		<cu-custom bgColor="bg-white" :isBack="true">
			<block slot="content">
				<view class="custom-title">设置</view>
			</block>
		</cu-custom>
		<view class="padding-32">
			<view class="text-767879 text-bold-600 text-sm padding-left-4">个人</view>
			<view class="setting-content">
				<view class="flex align-center justify-between" @click="toNewPath('/pages/setting/userInfo')">
					<view>
						<view class="setting-name">个人信息</view>
						<view class="setting-desc">关于该账户个人信息设置</view>
					</view>
					<view>
						<image src="https://txr001.zthj.net/static/img/right.png" class="img-32"></image>
					</view>
				</view>
				<view class="flex align-center justify-between padding-top-48" @click="toNewPath('/pages/setting/realName')">
					<view >
						<view class="setting-name">实名认证<text class="un-rz">未认证</text>
						</view>
						<view class="setting-desc">验证身份证实名信息</view>
					</view>
					<view>
						<image src="https://txr001.zthj.net/static/img/right.png" class="img-32"></image>
					</view>
				</view>
			</view>
			<view class="text-767879 text-bold-600 text-sm padding-left-4 margin-top-32">账号</view>
			<view class="setting-content">
				<view class="flex align-center justify-between" @click="unBind">
					<view>
						<view class="setting-name">解除绑定</view>
						<view class="setting-desc">解除绑定您当前企业账号，解除成功后该企业账号将无法使用。</view>
					</view>
					<view>
						<image src="https://txr001.zthj.net/static/img/right.png" class="img-32"></image>
					</view>
				</view>
				<!-- <view class="flex align-center justify-between padding-top-48">
					<view>
						<view class="setting-name">数据绑定</view>
						<view class="setting-desc">关于该账户数据上传企业设置</view>
					</view>
					<view>
						<image src="https://txr001.zthj.net/static/img/right.png" class="img-32"></image>
					</view>
				</view> -->
				<view class="flex align-center justify-between padding-top-48" @click="toNewPath('/pages/setting/setPassword')">
					<view>
						<view class="setting-name">密码设置</view>
						<view class="setting-desc">设置密码后可以通过手机号 + 密码登录碳账户</view>
					</view>
					<view>
						<image src="https://txr001.zthj.net/static/img/right.png" class="img-32"></image>
					</view>
				</view>
			</view>
			
			<!-- <view class="text-767879 text-bold-600 text-sm padding-left-4 margin-top-32">通用</view> -->
			<!-- <view class="setting-content">
				<view class="flex align-center justify-between" @click="toNewPath('/pages/setting/noticeSetting')">
					<view>
						<view class="setting-name">通知设置</view>
						<view class="setting-desc">将向绑定的微信和邮箱账户发送通知</view>
					</view>
					<view>
						<image src="https://txr001.zthj.net/static/img/right.png" class="img-32"></image>
					</view>
				</view>
				<view class="flex align-center justify-between padding-top-48" @click="toNewPath('/pages/setting/question')">
					<view>
						<view class="setting-name">常见问题</view>
						<view class="setting-desc">罗列一些常见问题解答帮助用户更好体验</view>
					</view>
					<view>
						<image src="https://txr001.zthj.net/static/img/right.png" class="img-32"></image>
					</view>
				</view>
				<view class="flex align-center justify-between padding-top-48" @click="toNewPath('/pages/setting/feedBack')">
					<view>
						<view class="setting-name">意见反馈</view>
						<view class="setting-desc">收集用户意见反馈提高用户体验</view>
					</view>
					<view>
						<image src="https://txr001.zthj.net/static/img/right.png" class="img-32"></image>
					</view>
				</view>
				<view class="flex align-center justify-between padding-top-48" @click="toNewPath('/pages/setting/about')">
					<view>
						<view class="setting-name">关于我们</view>
						<view class="setting-desc">关于青牒碳账户的一些协议和版本号</view>
					</view>
					<view>
						<image src="https://txr001.zthj.net/static/img/right.png" class="img-32"></image>
					</view>
				</view>
			</view> -->
			
			<button class="cu-btn out-btn" @click="loginOut">退出登录</button>
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
			}
		},
		onLoad(){
		},
		methods: {
			unBind(){
				uni.showModal({
					title: '解除绑定',
					content: '您是否解除绑定您当前企业账号,解绑成功后该企业账号将无法使用。',
					success: function(res) {
						if (res.confirm) {
							
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			},
			loginOut(){
				let that = this;
				uni.showModal({
					title: '退出登录',
					content: '退出后不会删除任何历史数据，下次登录依然可以使用本账号。',
					success: function(res) {
						if (res.confirm) {
							that.goPage('out')
						} else if (res.cancel) {
							// console.log('用户点击取消');
						}
					}
				});
			},
			toNewPath(url){
				uni.navigateTo({
					url:url
				})
			}
		}
	}
</script>

<style>
	page{background: linear-gradient(180deg, rgba(244,244,244,0) 10%, #F4F4F4 19%);}
</style>
<style scoped>
	.setting-content{
		background: #FFFFFF;
		border-radius: 48rpx;
		padding: 48rpx 32rpx;
		margin-top: 24rpx;
	}
	.setting-name{
		font-size: 32rpx;
		font-weight: 400;
		color: #010101;
	}
	.setting-desc{
		font-size: 24rpx;
		font-weight: 400;
		color: #B2B6B8;
		padding-top: 6rpx;
	}
	.un-rz{
		height: 28rpx;
		background: #24458E;
		border-radius: 14rpx;
		padding: 0 8rpx;
		font-size: 20rpx;
		font-weight: 400;
		color: #FFFFFF;
		margin-left: 12rpx;
	}
	.out-btn{
		margin-top: 80rpx;
		height: 88rpx;
		line-height: 88rpx;
		background: #FFFFFF;
		border-radius: 44rpx;
		opacity: 1;
		font-size: 32rpx;
		font-weight: 400;
		color: #010101;
		width: 100%;
	}
</style>